/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_IUpdateNotify : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(API.IUpdateNotify); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : API.IUpdateNotify, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodnotifyBegin0;
        bool isCallingnotifyBegin0= false;
        
            public  void notifyBegin() 
            { 
                if (methodnotifyBegin0 == null && instance!=null )
                {
                    methodnotifyBegin0 = instance.Type.GetMethod("notifyBegin", 0);
                }
                if (methodnotifyBegin0 != null && !isCallingnotifyBegin0)
                {
                    isCallingnotifyBegin0 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodnotifyBegin0, instance, null );
                        
                        
                        
                        isCallingnotifyBegin0 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In notifyBegin *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodnotifyDescription1;
        bool isCallingnotifyDescription1= false;
        
            public  void notifyDescription(System.String p0) 
            { 
                if (methodnotifyDescription1 == null && instance!=null )
                {
                    methodnotifyDescription1 = instance.Type.GetMethod("notifyDescription", 1);
                }
                if (methodnotifyDescription1 != null && !isCallingnotifyDescription1)
                {
                    isCallingnotifyDescription1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodnotifyDescription1, instance, param );
                        
                        
                        isCallingnotifyDescription1 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In notifyDescription *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodnotifyProgress2;
        bool isCallingnotifyProgress2= false;
        
            public  void notifyProgress(System.Single p0) 
            { 
                if (methodnotifyProgress2 == null && instance!=null )
                {
                    methodnotifyProgress2 = instance.Type.GetMethod("notifyProgress", 1);
                }
                if (methodnotifyProgress2 != null && !isCallingnotifyProgress2)
                {
                    isCallingnotifyProgress2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodnotifyProgress2, instance, param );
                        
                        
                        isCallingnotifyProgress2 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In notifyProgress *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodnotifyEnd3;
        bool isCallingnotifyEnd3= false;
        
            public  void notifyEnd(System.Boolean p0, System.String p1) 
            { 
                if (methodnotifyEnd3 == null && instance!=null )
                {
                    methodnotifyEnd3 = instance.Type.GetMethod("notifyEnd", 2);
                }
                if (methodnotifyEnd3 != null && !isCallingnotifyEnd3)
                {
                    isCallingnotifyEnd3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodnotifyEnd3, instance, param );
                        
                        
                        isCallingnotifyEnd3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In notifyEnd *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                        
                    

                }
            }
        
        
        
        IMethod methodisFileNeed4;
        bool isCallingisFileNeed4= false;
        
            public  System.Boolean isFileNeed(System.String p0) 
            { 
                if (methodisFileNeed4 == null && instance!=null )
                {
                    methodisFileNeed4 = instance.Type.GetMethod("isFileNeed", 1);
                }
                if (methodisFileNeed4 != null && !isCallingisFileNeed4)
                {
                    isCallingisFileNeed4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodisFileNeed4, instance, param );
                        
                        
                        isCallingisFileNeed4 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In isFileNeed *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodshouldFileRemove5;
        bool isCallingshouldFileRemove5= false;
        
            public  System.Boolean shouldFileRemove(System.String p0) 
            { 
                if (methodshouldFileRemove5 == null && instance!=null )
                {
                    methodshouldFileRemove5 = instance.Type.GetMethod("shouldFileRemove", 1);
                }
                if (methodshouldFileRemove5 != null && !isCallingshouldFileRemove5)
                {
                    isCallingshouldFileRemove5 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodshouldFileRemove5, instance, param );
                        
                        
                        isCallingshouldFileRemove5 = false;

                        
                        return (System.Boolean)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In shouldFileRemove *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.Boolean);
                        
                    

                }
            }
        
        
        
        IMethod methodgetStorageRoot6;
        bool isCallinggetStorageRoot6= false;
        
            public  System.String getStorageRoot() 
            { 
                if (methodgetStorageRoot6 == null && instance!=null )
                {
                    methodgetStorageRoot6 = instance.Type.GetMethod("getStorageRoot", 0);
                }
                if (methodgetStorageRoot6 != null && !isCallinggetStorageRoot6)
                {
                    isCallinggetStorageRoot6 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodgetStorageRoot6, instance, null );
                        
                        
                        
                        isCallinggetStorageRoot6 = false;

                        
                        return (System.String)ret;
                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In getStorageRoot *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            return default(System.String);
                        
                    

                }
            }
        
        
    }
}